updating oE poke_string
poke_string
include machine.e namespace machine public function poke_string(atom buffaddr, integer buffsize, sequence s)
Stores a C-style null-terminated ANSI string in memory
Parameters:
- buffaddr: an atom, the RAM address to to the string at.
- buffsize: an integer, the number of bytes available, starting from buffaddr.
- s : a sequence, the string to store at address buffaddr.
Comments:
- This does not allocate an RAM. You must supply the preallocated area.
- This can only be used on ANSI strings. It cannot be used for double-byte strings.
- If s is not a string, nothing is stored and a zero is returned.
Returns:
An atom. If this is zero, then nothing was stored, otherwise it is the address of the first byte after the stored string.
Example 1:
atom title title = allocate(1000) if poke_string(title, 1000, "The Wizard of Oz") then -- successful else -- failed end if
See Also:
Not Categorized, Please Help
|